﻿using Orchard.UI.Resources;

namespace NineSeas
{
    public class ResourceManifest : IResourceManifestProvider
    {
        public void BuildManifests(ResourceManifestBuilder builder)
        {
            // Create and add a new manifest
            var manifest = builder.Add();

            // Define an "Authoring" style sheet
            manifest.DefineStyle("NineSeas.Common").SetUrl("common.css");
            manifest.DefineStyle("FancyBox").SetUrl("jquery.fancybox.css");
            manifest.DefineStyle("jQuery_Ias").SetUrl("jquery.ias.css").SetVersion("0.1.6");

            manifest.DefineStyle("NineSeas.Home").SetUrl("home.css");

            manifest.DefineStyle("NineSeas.Reader").SetUrl("reader.css");

            manifest.DefineStyle("NineSeas.Book.View").SetUrl("book.view.css").SetDependencies("NineSeas.Common");
            manifest.DefineStyle("NineSeas.Book.ChapterDropDown").SetUrl("book.chapter-dropdown.css");
            manifest.DefineStyle("NineSeas.Book.Chapters").SetUrl("book.chapters.css").SetDependencies("NineSeas.Common");

            manifest.DefineStyle("NineSeas.Authoring").SetUrl("authoring.css").SetDependencies("NineSeas.Common");
            manifest.DefineStyle("NineSeas.Authoring.Books").SetUrl("authoring.books.css").SetDependencies("NineSeas.Common");
            manifest.DefineStyle("NineSeas.Authoring.Book.Edit").SetUrl("authoring.book.edit.css").SetDependencies("NineSeas.Common");
            manifest.DefineStyle("NineSeas.Authoring.Book.Chapter.Edit").SetUrl("authoring.book.editchapter.css").SetDependencies("NineSeas.Common");
            manifest.DefineStyle("NineSeas.ColorPicker").SetUrl("colorpicker.css");

            manifest.DefineStyle("NineSeas.Authors").SetUrl("authors.css").SetDependencies("NineSeas.Common");
            manifest.DefineStyle("NineSeas.Authors.Author.Details").SetUrl("authors.author.details.css").SetDependencies("NineSeas.Common");
            manifest.DefineStyle("NineSeas.CategorySelector").SetUrl("categorySelector.css");
            manifest.DefineStyle("NineSeas.CategoryMenu").SetUrl("categoryMenu.css");
            manifest.DefineStyle("NineSeas.HelpPopup").SetUrl("help-popup.css");
           
            // book view list
            manifest.DefineStyle("NineSeas.BookView.List").SetUrl("bookview.list.css").SetDependencies("NineSeas.Common");
            
            // admin
            manifest.DefineStyle("NineSeas.Books.Summary").SetUrl("books.summary.css");

            // scripts
            manifest.DefineScript("FancyBox").SetUrl("jquery.fancybox.js").SetDependencies("jQuery");
            manifest.DefineScript("MovingBox").SetUrl("jquery.movingboxes.min.js").SetDependencies("jQuery");
            manifest.DefineScript("jQuery_Ias").SetUrl("jquery.ias.js").SetVersion("0.1.6").SetDependencies("jQuery");
            manifest.DefineScript("NineSeas.Home").SetUrl("home.js").SetDependencies("jQuery");

            manifest.DefineScript("FriendUrl").SetUrl("jquery.friendurl.js").SetDependencies("jQuery");
            manifest.DefineScript("NineSeas.Common").SetUrl("common.js").SetDependencies("jQueryUI_Dialog");
            manifest.DefineScript("NineSeas.Authoring.Book.Edit").SetUrl("authoring.book.edit.js").SetDependencies("FriendUrl");
            manifest.DefineScript("NineSeas.InplaceMessage").SetUrl("inplaceMessage.js").SetDependencies("jQueryUI_Core", "jQueryUI_Widget");
            manifest.DefineScript("NineSeas.MediaUploadButton").SetUrl("mediaUploadButton.js").SetDependencies("jQueryUI_Core", "jQueryUI_Widget");
            manifest.DefineScript("NineSeas.CommandBar").SetUrl("commandBar.js").SetDependencies("jQueryUI_Core", "jQueryUI_Widget");
            manifest.DefineScript("NineSeas.Book.Pager").SetUrl("book.pager.js").SetDependencies("NineSeas.CommandBar");
            manifest.DefineScript("NineSeas.Authoring").SetUrl("authoring.js").SetDependencies("NineSeas.Common");
            manifest.DefineScript("NineSeas.ColorPicker").SetUrl("colorpicker.js").SetDependencies("NineSeas.Common", "jQueryUI_Widget");
            manifest.DefineScript("NineSeas.CategorySelector").SetUrl("categorySelector.js").SetDependencies("jQuery");
            manifest.DefineScript("NineSeas.HelpPopup").SetUrl("help-popup.js").SetDependencies("jQuery");
            manifest.DefineScript("NineSeas.PopupPanel").SetUrl("popupPanel.js").SetDependencies("jQuery");
            manifest.DefineScript("NineSeas.Reader").SetUrl("reader.js").SetDependencies("jQuery", "NineSeas.PopupPanel");

            manifest.DefineScript("jQueryTools").SetUrl("jquery.tools.min.js").SetDependencies("jQuery");
        }
    }
}